// pages/team/team.js
const app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    totalIncome:0,
    totalCount:0,
    list:[]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that=this;
    var uid = wx.getStorageSync('uid');
    var param = {
      uid: uid
    }
    app.wxRequest('POST', "Index/myTeamList", param, (res) => {
      var data = res.data;
      that.setData({
        totalIncome:data.totalIncome,
        totalCount:data.totalCount,
        list: data.list
      })
    }, (err) => {
      console.log(err.errMsg)
    })
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})